<template>
  <div class="top_search">
    <div class="top_search_content" @click="goIndexSearch">
      <div class="top_search_right">
        <div>资讯百科 <span class="iconfont icon-xiala"></span></div>
        <div>
          请输入关键词
        </div>
      </div>
      <div>
        <span class="iconfont icon-sousuo"></span>
      </div>
    </div>
  </div>
</template>

<script>
  import {setSearchType} from '../../assets/js/cache';

  export default {
    name: 'TopSearch',
    methods: {
      //跳转到搜索页面
      goIndexSearch() {
        // setSearchType(2);
        this.$store.commit('setSearchType','地产新闻');
        this.$router.push({name:'IndexSearch'})
      }

    }
  }
</script>

<style scoped>
.top_search .top_search_content{
  display: flex;
  justify-content: space-between;
  background-color: #ffffff;
  height: 30px;
  line-height: 30px;
  padding: 0 10px;
  font-size: 0.8rem;
}.top_search .top_search_content .top_search_right{
  display: flex;
  justify-content: space-between;
}
.top_search .top_search_content .top_search_right>div:nth-child(2){
  margin-left: 10px;
}
</style>
